<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.List"%>
<%@page import="com.model.Menu"%>
<%@page import="com.model.Role"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PayChannel</title>
<link href="styles/general.css" rel="stylesheet" type="text/css" /><link href="styles/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/transport.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/_sorttable.js"></script>
    <script src="js/utils.js" type="text/javascript"></script>
</head>
<script type="text/javascript">
window.onload = function(){
	sortTable = new SortTable("list-table","listbody",1);
};
</script>
<body>
<h1>
        <span class="action-span"><a href="role_show.do">添加角色</a></span> <span
            class="action-span1"><a href="mainframe.jsp">
                首页</a> </span><span id="search_id" class="action-span1">- 角色管理 </span>
    </h1>
    <div class="list-div" id="listDiv">
        <table width="100%" cellspacing="1" cellpadding="2" id="list-table">
                <tr>
                    <th height="20">序号</th>
				    <th>角色名称</th>
				    <th>说明</th>
				    <th>操作</th>
                </tr>
                 <tbody id="listbody">
                <s:if test="list.size()>0">  
			  	<s:iterator value="list" status="i"> 
			  		<tr>
					    <td style="background-color: rgb(255, 255, 255);"><s:property value="#i.count"/></td>
					    <td style="background-color: rgb(255, 255, 255);"><s:property value="roleName"/></td> 
					    <td style="background-color: rgb(255, 255, 255);"><s:property value="remark"/></td>
					     <td style="background-color: rgb(255, 255, 255);">
					     <a href="role_show.do?type=upd&model.id=<s:property value="id"/>">
					     <img height="16" width="16" border="0" src="img/icon_edit.gif" alt="编辑"></a>&nbsp;   
						<a href="role_save.do?type=del&model.id=<s:property value="id"/>" onclick="return window.confirm('警告！！确定要删除吗？')">
							<img height="16" width="16" border="0" src="img/icon_trash.gif" alt="删除">
						</a>	</td>
			  
					  </tr>
			  	</s:iterator>
			  </s:if>
     		</tbody>
     	</table>
     </div>
      <!--Bottom开始-->
    
<div id="footer">
<script language="JavaScript">

if (document.getElementById("listDiv"))
{
  document.getElementById("listDiv").onmouseover = function(e)
  {
    obj = Utils.srcElement(e);

    if (obj)
    {
      if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
      else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
      else return;

      for (i = 0; i < row.cells.length; i++)
      {
        if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#eeeded';
      }
    }

  }

  document.getElementById("listDiv").onmouseout = function(e)
  {
    obj = Utils.srcElement(e);

    if (obj)
    {
      if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
      else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
      else return;

      for (i = 0; i < row.cells.length; i++)
      {
          if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#FFF';
      }
    }
  }

}

    </script>
<br />
<s:property value="bottom"/></div>
    <!--Bottom结束-->
</body>
</html>